<?php get_header(); ?>
	<div id="content"> 
	<?php if (have_posts()) : ?>
	<h2 class="archive-title">
	 <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
		<?php /* If this is a category archive */ if (is_category()) { ?>				
		<?php _e('Category: ','paranimage'); ?><?php echo single_cat_title(); ?>
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<?php _e('Date Archive: ','paranimage'); ?><?php the_time('F jS, Y'); ?>
	 <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<?php _e('Date Archive: ','paranimage'); ?><?php the_time('F, Y'); ?>
		<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<?php _e('Date Archive: ','paranimage'); ?><?php the_time('Y'); ?>
		<?php /* If this is a tag */ } elseif (is_tag()) { ?>
		<?php _e('Tag: ','paranimage'); ?><?php echo single_tag_title(); ?>
	  <?php /* If this is a search */ } elseif (is_search()) { ?>
		<?php _e('Search Results: ','paranimage'); ?>
	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
		<?php _e('Author Archive: ','paranimage'); ?>
		<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<?php _e('Blog Archive: ','paranimage'); ?>
		<?php } ?></h2>
		<?php while (have_posts()) : the_post(); ?>
			<div class="post" id="post-<?php the_ID(); ?>">
				<div class="post-title clearfloat">
					<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
					<small><?php the_time('Y/m/d') ?></small>
				</div>
				<div class="post-meta clearfloat">
					<h3><?php _e('Category: ', 'paranimage'); ?><?php the_category(', ') ?><!-- by <?php the_author() ?> --><?php edit_post_link( __('Edit','paranimage'), ' | ', ''); ?></h3>
					<small><?php comments_popup_link( __( 'Add Comments &raquo;', 'paranimage' ), __( '1 Comments &raquo;', 'paranimage' ), __( '% Comments &raquo;', 'paranimage' ), 'comments-link', __('Comments closed', 'paranimage')); ?></small>
				</div>
				<div class="entry clearfloat">
					<?php the_content( __('Read more &raquo;', 'paranimage')); ?>
				</div>
			</div><!-- end .post -->
        <?php endwhile; ?>
		<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
			<div class="navigation clearfloat" id="archivenav">
				<div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries','paranimage')) ?></div>
				<div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;','paranimage')) ?></div>
			</div>
		<?php } ?>
	<?php else : ?>
		<div class="not-found">
			<h2 class="archive-title"><?php _e('The page you`re looking for doesn`t exist', 'paranimage'); ?></h2>
			<div class="entry">
				<p><?php _e('You can try search using keywords or ', 'paranimage'); ?><a href="<?php bloginfo('url'); ?>"><?php _e('go to home', 'paranimage'); ?></a></p>
			</div>
		</div>
	<?php endif; ?>
 </div><!-- end #content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
